package com.xuecheng.media.service;

import com.xuecheng.commons.model.dto.*;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.media.domain.Media;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 媒资信息 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-08-04
 */
public interface MediaService extends IService<Media> {

    // 获取上传凭证
    ResponseResult vodToken(VodUploadDto dto) throws Exception;

    // 刷新上传凭证
    ResponseResult refreshToken(String videoId) throws Exception;

    // 保存媒资
    ResponseResult saveMedia(MediaDto dto) throws Exception;

    // 媒资分页查询
    ResponseResult findByPage(PageRequest params, MediaQueryDto dto);

    // 媒资预览
    ResponseResult preview(Long mediaId) throws Exception;

    // 媒资删除
    ResponseResult deleteMedia(Long mediaId);
    // 媒资审核
    ResponseResult auditMedia(MediaAuditDto dto);

    // 根据id查媒资播放地址
    ResponseResult findMedisUrl(Long mediaId) throws Exception;
}
